Skip to main content

SetListValues

Sets the list values to the current combo box.

Syntax

expression.SetListValues(aListString);

expression - A variable that represents a ApiComboBoxForm class.

Parameters

NameRequired/OptionalData typeDefaultDescription
aListStringRequiredstring[]The combo box list values.

Returns

boolean

Example

This example sets the list values to the current combo box.

let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
comboBoxForm.SetListValues(["Latvia", "USA", "UK"]);